Let $a$ and $b$ be real numbers.  Find the maximum value of $a \cos \theta + b \sin \theta$ in terms of $a$ and $b.$
Explanation: By the Cauchy-Schwarz Inequality,
\[(a \cos \theta + b \sin \theta)^2 \le (a^2 + b^2)(\cos^2 \theta + \sin^2 \theta) = a^2 + b^2,\]so $a \cos \theta + b \sin \theta \le \sqrt{a^2 + b^2}.$

If $a = b = 0,$ then $a \cos \theta + b \sin \theta = 0$ for all $\theta.$  Otherwise, $a^2 + b^2 > 0,$ and we can find an angle $\theta$ such that
\[\cos \theta = \frac{a}{\sqrt{a^2 + b^2}} \quad \text{and} \quad \sin \theta = \frac{b}{\sqrt{a^2 + b^2}},\]which makes $a \cos \theta + b \sin \theta = \sqrt{a^2 + b^2}.$  Thus, the maximum value is $\boxed{\sqrt{a^2 + b^2}}.$